package grape.house.rest.estatelicence.vo;
import grape.base.service.dict.api.IDictService;
import grape.common.rest.vo.BaseIdVo;

import grape.common.service.trans.TransBy;
import grape.common.service.trans.TransField;
import grape.common.service.trans.impl.DatetimeTransServiceImpl;
import grape.house.rest.building.vo.BuildingPresalePermitVo;
import grape.house.rest.building.vo.BuildingVo;
import grape.house.service.estate.api.IEstateService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 楼盘许可证表
 * </p>
 *
 * @author yangwei
 * @since 2020-09-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="楼盘许可证数据响应对象")
public class EstateLicenceVo extends BaseIdVo<String> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号，唯一")
    private String code;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "楼盘id")
    private String estateId;

    @TransBy(type = IEstateService.trans_estate_name,byFieldName = "estateId")
    @ApiModelProperty(value = "楼盘名称")
    private String estateName;

    @ApiModelProperty(value = "五证许可类型，字典id")
    private String permitTypeDictId;

    @TransBy(type = IDictService.trans_dictName,byFieldName = "permitTypeDictId")
    @ApiModelProperty(value = "五证许可类型，字典名称")
    private String permitTypeDictName;

    @ApiModelProperty(value = "图片地址")
    private String imageUrl;

    @ApiModelProperty(value = "发证时间")
    private Long permitAt;

    @TransBy(type = DatetimeTransServiceImpl.trans_date,byFieldName = "permitAt")
    @ApiModelProperty(value = "发证时间文本")
    private String permitAtTxt;

    @ApiModelProperty(value = "排序,升序")
    private Integer seq;

    @ApiModelProperty(value = "备注")
    private String remark;

    @TransField
    @ApiModelProperty(value = "预售证许可范围楼栋")
    private List<BuildingPresalePermitVo> presalePermitBuildings;

}
